import {queryOrgList, onChange, buttonClick} from "./../common/index.js";
import CommonTreeReferStruc from "./../../../components/ReferTreeStruc";
import Button from 'bee-button';
import 'bee-button/build/Button.css';

const btnState = {
    ADD: 'add',
    EDIT: 'edit',
    BROWSE: 'browse'
}

export function btnListTpl ()  {
    return{
        [btnState.BROWSE]: [
            {
                key: 'Add',
                name: '新增',
                colors: "primary"
            },
            {
                key: 'Delete',
                name: '删除'
            }, 
            // {
            //     key: 'Component',
            //     name: (
            //         <CommonTreeReferStruc
            //             referType={"tree"}
            //             entryComponent = {
            //                 <Button>
            //                    组织生成企业
            //                 </Button>
            //             }
            //             data={this.state.orgData}
            //             selectedKeysId={this.state.checkedKeysId}
            //             selectedKeysName={this.state.checkedKeys}
            //             isShowSearchArea={true}
            //             handleSelectedKeys={(data) => {
            //                 console.log("点击确定后的数据", data)
            //                 buttonClick.call(this, "CreateBusiness", data)
                           
            //             }}
            //            // isShowSearchArea={false}
            //             title={'组织列表'}
            //             getData={queryOrgList.bind(this) }
            //             name={"sname"}
            //             code={"scode"}
            //             pk={"pkOrganization"}
            //             children={"children"}
            //         /> 
            //     )
            // },
            {
                key: 'CreateBusiness',
                name: '组织生成企业'
            },
            {
                key: 'refresh',
                name: '刷新'
            },
        ]
    }
}